home *** CD-ROM | disk | FTP | other *** search
- /*
- * this is not needed anymore. use an appropriate MINT.CNF instead
- *
- * ++jrb
- */
-
- asm("
- #APP
- | minimal gnu startup file
- .globl __stksize
- .globl __start
- .globl _main
-
- .even
- .text
- __start:
- movl a7@(4), a5 | Fetch base page pointer
- movl a5@(24), a1 | Fetch bss base
- addl a5@(28), a1 | + size of bss
- | Allocate stack, a1 points beyond vectors
- addl __stksize, a1 | Allocate _stksize_ bytes of stack
- movl a1, a7 | Set the initial stack.
- | Release unused memory to the system pool.
- subl a5, a1 | Compute size of retained memory
- movl a1, a7@-
- movl a5, a7@- | Base of retained memory
- clrw a7@- | Must be zero
- movw #0x4A, a7@- | Mshrink opcode
- trap #1 | Gemdos
- lea a7@(12), a7 | Pop arguments
- | Call main(argc, argv, envp)
- subl a6, a6 | Zero frame pointer
- jbsr _main | Call main line
- | Exit with return from main
- clrw a7@- | Pterm0()
- trap #1");
-
- #include <osbind.h>
-
- char *env = "\
- HOME=d:/bin\0\
- SHELL=d:\\bin\\shell.prg\0\
- DEFAULT_FONT=d:/mgr/font/sail6x8r.fnt\0\
- MGRFONT=d:/mgr/font\0\
- MGRICON=d:/mgr/icon\0\
- ARGV=d:\\bin\\mgr.prg\0\
- \0\0\0";
- char tail[128];
- long _stksize = 128L;
- main()
- {
- *tail = 0x7f;
- Pexec(0, "d:\\bin\\mgr.prg", tail, env);
- }
-